package com.guass.nettyprotostuff.service;

import com.guass.nettyprotostuff.rpc.common.ModelMsg;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author guass
 */
public interface RpcService {
    void onDataReceive(ChannelHandlerContext ctx, ModelMsg msg);

    void onTerminalActive(ChannelHandlerContext ctx);

    void onTerminalInActive(ChannelHandlerContext ctx);

    void sendData(Channel channel, ModelMsg modelMsg);

    void sendMessageToAll(String msg);

    int getChannelCount();
}
